//
//  ComposeTextView.swift
//  WB
//
//  Created by leador on 17/5/12.
//  Copyright © 2017年 袁满. All rights reserved.
//

import UIKit

class ComposeTextView: UITextView {
    
    lazy var placeHolderLabel : UILabel = UILabel()

    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
    
        setupUI()
        
    }
    
}

extension ComposeTextView {
    
    func setupUI() {
        
        addSubview(placeHolderLabel)
        
        placeHolderLabel.snp.updateConstraints { (make) in
            make.top.equalTo(8)
            make.left.equalTo(12)
        }
        
        placeHolderLabel.textColor = UIColor.lightGray
        placeHolderLabel.font = font
        
        placeHolderLabel.text = "分享新鲜事..."
        
        textContainerInset = UIEdgeInsets(top: 8, left: 7, bottom: 0, right: 7)
    }
    
}
